package com.wms.service;

import com.wms.bean.PageBean;
import com.wms.dto.AllocatedetailVo;
import com.wms.dto.AllocatetailQueryVo;
import com.wms.dto.AllocatetailSaveVo;
import com.wms.entity.Allocatedetail;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface AllocatedetailService {
    /**
     * 条件分页查询
     */
    PageBean<List<Allocatedetail>> query(AllocatetailQueryVo queryVo);

    /**
     * 新增详情
     */
    int save(AllocatetailSaveVo saveVo);

    /**
     * 更新详情
     */
    int update(AllocatetailSaveVo saveVo);

    /**
     * 逻辑删除
     */
    int remove(Integer id);

    /**
     * 物理删除
     */
    int removePhysics(Integer id);

    /**
     * 上传图片
     */
    String toUpload(MultipartFile file, HttpServletRequest request);


    /**
     * 打印调拨单PDF类型
     */
    /**
     * 生成调拨单详情PDF并响应到前端
     * @param queryVo 查询条件
     * @param response 响应对象
     */
    void generatePrintPdf(AllocatetailQueryVo queryVo, HttpServletResponse response) throws Exception;


    /**
     * 打印excel表
     */
    void generateExcel(HttpServletResponse response, List<Allocatedetail> detailList) throws IOException;
}
